{-# OPTIONS_GHC -XDeriveDataTypeable #-}
module CommunicationChannelService where
import Data.List
import Data.Maybe
import Data.Typeable
import Data.Time.LocalTime
import XI.Directory.WS.Xmlable
import XI.Directory.WS.Main

ws = "CommunicationChannelService"
nss = [("urn0","urn:com.sap.aii.ibdir.server.api.types"),("urn1","urn:CommunicationChannelServiceVi"),("urn2","urn:com.sap.aii.ib.server.api.types")]

-- operations

change :: WsParams -> ChangeInput -> IO ChangeOutput
change = runService ws nss "urn1:change"
check :: WsParams -> CheckInput -> IO CheckOutput
check = runService ws nss "urn1:check"
create :: WsParams -> CreateInput -> IO CreateOutput
create = runService ws nss "urn1:create"
createFromTemplate :: WsParams -> CreateFromTemplateInput -> IO CreateFromTemplateOutput
createFromTemplate = runService ws nss "urn1:createFromTemplate"
delete :: WsParams -> DeleteInput -> IO DeleteOutput
delete = runService ws nss "urn1:delete"
openForEdit :: WsParams -> OpenForEditInput -> IO OpenForEditOutput
openForEdit = runService ws nss "urn1:openForEdit"
query :: WsParams -> QueryInput -> IO QueryOutput
query = runService ws nss "urn1:query"
read :: WsParams -> ReadInput -> IO ReadOutput
read = runService ws nss "urn1:read"
revert :: WsParams -> RevertInput -> IO RevertOutput
revert = runService ws nss "urn1:revert"


-- types definition

data ChangeInput = ChangeInput {
    cC_ChangeRequest :: Maybe CC_CreateChangeIn
} deriving (Typeable, Show, Eq) 

data CC_CreateChangeIn = CC_CreateChangeIn {
    cccciCL_ID :: Maybe String,
    cccciCommunicationChannel :: Maybe [CC_Restricted]
} deriving (Typeable, Show, Eq) 

data CC_Restricted = CC_Restricted {
    ccrMasterLanguage :: Maybe String,
    ccrAdministrativeData :: Maybe OA_DataRestricted,
    ccrDescription :: Maybe [LONG_Description],
    ccrCC_ID :: Maybe CC_ID,
    ccrAdapterMetadata :: Maybe DO_ID,
    ccrDirection :: Maybe String,
    ccrTransportProtocol :: Maybe String,
    ccrTP_Version :: Maybe String,
    ccrMessageProtocol :: Maybe String,
    ccrMP_Version :: Maybe String,
    ccrAE_Name :: Maybe String,
    ccrAS_Attribute :: Maybe [GenericProperty],
    ccrAS_TableAttribute :: Maybe [GP_Table],
    ccrModuleProcess :: Maybe ModuleProcess,
    ccrSenderIdentifier :: Maybe CA_Identifier,
    ccrReceiverIdentifier :: Maybe CA_Identifier
} deriving (Typeable, Show, Eq) 

data OA_DataRestricted = OA_DataRestricted {
    oadrRU_AccountID :: Maybe String
} deriving (Typeable, Show, Eq) 

data LONG_Description = LONG_Description {
    ldlanguageCode :: Maybe String,
    ldvalue :: Maybe String
} deriving (Typeable, Show, Eq) 

data CC_ID = CC_ID {
    ccidPartyID :: Maybe String,
    ccidComponentID :: Maybe String,
    ccidChannelID :: Maybe String
} deriving (Typeable, Show, Eq) 

data DO_ID = DO_ID {
    doidName :: Maybe String,
    doidNamespace :: Maybe String,
    doidSC_VersionID :: Maybe String
} deriving (Typeable, Show, Eq) 

data GenericProperty = GenericProperty {
    gpName :: Maybe String,
    gpValue :: Maybe String
} deriving (Typeable, Show, Eq) 

data GP_Table = GP_Table {
    gptName :: Maybe String,
    gptVT_Row :: Maybe [GT_Row]
} deriving (Typeable, Show, Eq) 

data GT_Row = GT_Row {
    gtrVT_Cell :: Maybe [GT_RowTableCell]
} deriving (Typeable, Show, Eq) 

data GT_RowTableCell = GT_RowTableCell {
    gtrtcColumnName :: Maybe String,
    gtrtcValue :: Maybe String
} deriving (Typeable, Show, Eq) 

data ModuleProcess = ModuleProcess {
    mpProcessStep :: Maybe [ProcessStep],
    mpParameterGroup :: Maybe [ParameterGroup]
} deriving (Typeable, Show, Eq) 

data ProcessStep = ProcessStep {
    psModuleName :: Maybe String,
    psModuleType :: Maybe String,
    psPG_ID :: Maybe String
} deriving (Typeable, Show, Eq) 

data ParameterGroup = ParameterGroup {
    pgPG_ID :: Maybe String,
    pgParameter :: Maybe [GP_Restricted]
} deriving (Typeable, Show, Eq) 

data GP_Restricted = GP_Restricted {
    gprName :: Maybe String,
    gprValue :: Maybe String
} deriving (Typeable, Show, Eq) 

data CA_Identifier = CA_Identifier {
    caisI_D :: Maybe String,
    caisA_ID :: Maybe String
} deriving (Typeable, Show, Eq) 

data ChangeOutput = ChangeOutput {
    responseChangeOutput :: Maybe CO_ModifyOut
} deriving (Typeable, Show, Eq) 

data CO_ModifyOut = CO_ModifyOut {
    comoCL_ID :: Maybe CL_ID,
    comoLM_Collection :: Maybe LM_Collection
} deriving (Typeable, Show, Eq) 

data CL_ID = CL_ID {
    clidCL_ID :: Maybe String,
    clidName :: Maybe String,
    clidDescription :: Maybe LONG_Description
} deriving (Typeable, Show, Eq) 

data LM_Collection = LM_Collection {
    lmcLogMessage :: Maybe [LogMessage],
    lmcLM_ChangeList :: Maybe [LM_ChangeList],
    lmcLM_Party :: Maybe [LM_Party],
    lmcLM_BusinessSystem :: Maybe [LM_CommunicationComponent],
    lmcLM_BusinessComponent :: Maybe [LM_CommunicationComponent],
    lmcLM_IntegrationProcess :: Maybe [LM_CommunicationComponent],
    lmcLM_CommunicationChannel :: Maybe [LM_CommunicationChannel],
    lmcLM_SenderAgreement :: Maybe [LM_MessageHeader],
    lmcLM_ReceiverAgreement :: Maybe [LM_MessageHeader],
    lmcLM_InterfaceDetermination :: Maybe [LM_MessageHeader],
    lmcLM_ReceiverDetermination :: Maybe [LM_MessageHeader],
    lmcLM_ValueMapping :: Maybe [LM_ValueMapping],
    lmcLM_ConfigurationScenario :: Maybe [LM_ConfigurationScenario]
} deriving (Typeable, Show, Eq) 

data LogMessage = LogMessage {
    lmLM_Item :: Maybe LM_Item
} deriving (Typeable, Show, Eq) 

data LM_Item = LM_Item {
    lmiSeverityCode :: Maybe String,
    lmiClassificationCode :: Maybe String,
    lmiMessage :: Maybe Text
} deriving (Typeable, Show, Eq) 

data Text = Text {
    tlanguageCode :: Maybe String,
    tvalue :: Maybe String
} deriving (Typeable, Show, Eq) 

data LM_ChangeList = LM_ChangeList {
    lmclCL_ID :: Maybe CL_ID,
    lmclLM_Item :: Maybe LM_Item
} deriving (Typeable, Show, Eq) 

data LM_Party = LM_Party {
    lmpPartyID :: Maybe String,
    lmpLM_Item :: Maybe LM_Item
} deriving (Typeable, Show, Eq) 

data LM_CommunicationComponent = LM_CommunicationComponent {
    lmccmpCC_ID :: Maybe CCmp_ID,
    lmccmpLM_Item :: Maybe LM_Item
} deriving (Typeable, Show, Eq) 

data CCmp_ID = CCmp_ID {
    ccmpidPartyID :: Maybe String,
    ccmpidComponentID :: Maybe String
} deriving (Typeable, Show, Eq) 

data LM_CommunicationChannel = LM_CommunicationChannel {
    lmccCC_ID :: Maybe CC_ID,
    lmccLM_Item :: Maybe LM_Item
} deriving (Typeable, Show, Eq) 

data LM_MessageHeader = LM_MessageHeader {
    lmmhMessageHeader :: Maybe MH_ID,
    lmmhLM_Item :: Maybe LM_Item
} deriving (Typeable, Show, Eq) 

data MH_ID = MH_ID {
    mhidSP_ID :: Maybe String,
    mhidSC_ID :: Maybe String,
    mhidInterfaceName :: Maybe String,
    mhidInterfaceNamespace :: Maybe String,
    mhidRP_ID :: Maybe String,
    mhidRC_ID :: Maybe String
} deriving (Typeable, Show, Eq) 

data LM_ValueMapping = LM_ValueMapping {
    lmvmVM_ID :: Maybe String,
    lmvmLM_Item :: Maybe LM_Item
} deriving (Typeable, Show, Eq) 

data LM_ConfigurationScenario = LM_ConfigurationScenario {
    lmcsCS_ID :: Maybe String,
    lmcsLM_Item :: Maybe LM_Item
} deriving (Typeable, Show, Eq) 

data CheckInput = CheckInput {
    cC_CheckRequest :: Maybe CC_IdentifierCollection
} deriving (Typeable, Show, Eq) 

data CC_IdentifierCollection = CC_IdentifierCollection {
    ccicCC_ID :: Maybe [CC_ID]
} deriving (Typeable, Show, Eq) 

data CheckOutput = CheckOutput {
    responseCheckOutput :: Maybe LM_Collection
} deriving (Typeable, Show, Eq) 

data CreateInput = CreateInput {
    cC_CreateRequest :: Maybe CC_CreateChangeIn
} deriving (Typeable, Show, Eq) 

data CreateOutput = CreateOutput {
    responseCreateOutput :: Maybe CO_ModifyOut
} deriving (Typeable, Show, Eq) 

data CreateFromTemplateInput = CreateFromTemplateInput {
    cC_CreateFromTemplateRequest :: Maybe CC_CreateFromTemplateIn
} deriving (Typeable, Show, Eq) 

data CC_CreateFromTemplateIn = CC_CreateFromTemplateIn {
    cccftiCL_ID :: Maybe String,
    cccftiCommunicationChannel :: Maybe [CC_TemplateBased]
} deriving (Typeable, Show, Eq) 

data CC_TemplateBased = CC_TemplateBased {
    cctbMasterLanguage :: Maybe String,
    cctbAdministrativeData :: Maybe OA_DataRestricted,
    cctbDescription :: Maybe [LONG_Description],
    cctbCC_ID :: Maybe CC_ID,
    cctbChannelTemplate :: Maybe DO_ID,
    cctbAE_Name :: Maybe String,
    cctbAS_Attribute :: Maybe [GenericProperty],
    cctbAS_TableAttribute :: Maybe [GP_Table],
    cctbModuleProcess :: Maybe ModuleProcess,
    cctbSenderIdentifier :: Maybe CA_Identifier,
    cctbReceiverIdentifier :: Maybe CA_Identifier
} deriving (Typeable, Show, Eq) 

data CreateFromTemplateOutput = CreateFromTemplateOutput {
    responseCreateFromTemplateOutput :: Maybe CO_ModifyOut
} deriving (Typeable, Show, Eq) 

data DeleteInput = DeleteInput {
    cC_DeleteRequest :: Maybe CC_DeleteOpenForEditIn
} deriving (Typeable, Show, Eq) 

data CC_DeleteOpenForEditIn = CC_DeleteOpenForEditIn {
    ccdofeiCL_ID :: Maybe String,
    ccdofeiCC_ID :: Maybe [CC_ID]
} deriving (Typeable, Show, Eq) 

data DeleteOutput = DeleteOutput {
    responseDeleteOutput :: Maybe CO_ModifyOut
} deriving (Typeable, Show, Eq) 

data OpenForEditInput = OpenForEditInput {
    cC_OpenForEditRequest :: Maybe CC_DeleteOpenForEditIn
} deriving (Typeable, Show, Eq) 

data OpenForEditOutput = OpenForEditOutput {
    responseOpenForEditOutput :: Maybe CC_OpenForEditOut
} deriving (Typeable, Show, Eq) 

data CC_OpenForEditOut = CC_OpenForEditOut {
    ccofeoCL_ID :: Maybe CL_ID,
    ccofeoCommunicationChannel :: Maybe [CommunicationChannel],
    ccofeoLM_Collection :: Maybe LM_Collection
} deriving (Typeable, Show, Eq) 

data CommunicationChannel = CommunicationChannel {
    ccMasterLanguage :: Maybe String,
    ccAdministrativeData :: Maybe OA_Data,
    ccDescription :: Maybe [LONG_Description],
    ccCC_ID :: Maybe CC_ID,
    ccAdapterMetadata :: Maybe DO_ID,
    ccDirection :: Maybe String,
    ccTransportProtocol :: Maybe String,
    ccTP_Version :: Maybe String,
    ccMessageProtocol :: Maybe String,
    ccMP_Version :: Maybe String,
    ccAE_Name :: Maybe String,
    ccAS_Attribute :: Maybe [GenericProperty],
    ccAS_TableAttribute :: Maybe [GP_Table],
    ccModuleProcess :: Maybe ModuleProcess,
    ccSenderIdentifier :: Maybe CA_Identifier,
    ccReceiverIdentifier :: Maybe CA_Identifier
} deriving (Typeable, Show, Eq) 

data OA_Data = OA_Data {
    oadRU_AccountID :: Maybe String,
    oadLC_DateTime :: Maybe LocalTime,
    oadLC_UserAccountID :: Maybe String
} deriving (Typeable, Show, Eq) 

data QueryInput = QueryInput {
    cC_QueryRequest :: Maybe CC_QueryIn
} deriving (Typeable, Show, Eq) 

data CC_QueryIn = CC_QueryIn {
    ccqiCC_ID :: Maybe CC_ID,
    ccqiDescription :: Maybe LONG_Description,
    ccqiAdministrativeData :: Maybe OA_Data
} deriving (Typeable, Show, Eq) 

data QueryOutput = QueryOutput {
    responseQueryOutput :: Maybe CC_QueryOut
} deriving (Typeable, Show, Eq) 

data CC_QueryOut = CC_QueryOut {
    ccqoCC_ID :: Maybe [CC_ID],
    ccqoLM_Collection :: Maybe LM_Collection
} deriving (Typeable, Show, Eq) 

data ReadInput = ReadInput {
    cC_ReadRequest :: Maybe CC_ReadIn
} deriving (Typeable, Show, Eq) 

data CC_ReadIn = CC_ReadIn {
    ccriReadContext :: Maybe String,
    ccriCC_ID :: Maybe [CC_ID]
} deriving (Typeable, Show, Eq) 

data ReadOutput = ReadOutput {
    responseReadOutput :: Maybe CC_ReadOut
} deriving (Typeable, Show, Eq) 

data CC_ReadOut = CC_ReadOut {
    ccroCommunicationChannel :: Maybe [CommunicationChannel],
    ccroLM_Collection :: Maybe LM_Collection
} deriving (Typeable, Show, Eq) 

data RevertInput = RevertInput {
    cC_RevertRequest :: Maybe CC_IdentifierCollection
} deriving (Typeable, Show, Eq) 

data RevertOutput = RevertOutput {
    responseRevertOutput :: Maybe LM_Collection
} deriving (Typeable, Show, Eq) 



-- instances


instance Xmlable ChangeInput where
	toContent x = [makeToContent ["urn1:CommunicationChannelChangeRequest"] [toContent.cC_ChangeRequest] x]
	fromContent cs = ChangeInput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:CommunicationChannelChangeRequest"] cs

instance Xmlable CC_CreateChangeIn where
	toContent x = [makeToContent ["urn0:ChangeListID", "urn0:CommunicationChannel"] [toContent.cccciCL_ID, toContent.cccciCommunicationChannel] x]
	fromContent cs = CC_CreateChangeIn (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ChangeListID", "urn0:CommunicationChannel"] cs

instance Xmlable CC_Restricted where
	toContent x = [makeToContent ["urn0:MasterLanguage", "urn0:AdministrativeData", "urn0:Description", "urn0:CommunicationChannelID", "urn0:AdapterMetadata", "urn0:Direction", "urn0:TransportProtocol", "urn0:TransportProtocolVersion", "urn0:MessageProtocol", "urn0:MessageProtocolVersion", "urn0:AdapterEngineName", "urn0:AdapterSpecificAttribute", "urn0:AdapterSpecificTableAttribute", "urn0:ModuleProcess", "urn0:SenderIdentifier", "urn0:ReceiverIdentifier"] [toContent.ccrMasterLanguage, toContent.ccrAdministrativeData, toContent.ccrDescription, toContent.ccrCC_ID, toContent.ccrAdapterMetadata, toContent.ccrDirection, toContent.ccrTransportProtocol, toContent.ccrTP_Version, toContent.ccrMessageProtocol, toContent.ccrMP_Version, toContent.ccrAE_Name, toContent.ccrAS_Attribute, toContent.ccrAS_TableAttribute, toContent.ccrModuleProcess, toContent.ccrSenderIdentifier, toContent.ccrReceiverIdentifier] x]
	fromContent cs = CC_Restricted (fromContent c1) (fromContent c2) (fromContent c3) (fromContent c4) (fromContent c5) (fromContent c6) (fromContent c7) (fromContent c8) (fromContent c9) (fromContent c10) (fromContent c11) (fromContent c12) (fromContent c13) (fromContent c14) (fromContent c15) (fromContent c16)
		where [c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16] = forFromContent nss ["urn0:MasterLanguage", "urn0:AdministrativeData", "urn0:Description", "urn0:CommunicationChannelID", "urn0:AdapterMetadata", "urn0:Direction", "urn0:TransportProtocol", "urn0:TransportProtocolVersion", "urn0:MessageProtocol", "urn0:MessageProtocolVersion", "urn0:AdapterEngineName", "urn0:AdapterSpecificAttribute", "urn0:AdapterSpecificTableAttribute", "urn0:ModuleProcess", "urn0:SenderIdentifier", "urn0:ReceiverIdentifier"] cs

instance Xmlable OA_DataRestricted where
	toContent x = [makeToContent ["urn2:ResponsibleUserAccountID"] [toContent.oadrRU_AccountID] x]
	fromContent cs = OA_DataRestricted (fromContent c1)
		where [c1] = forFromContent nss ["urn2:ResponsibleUserAccountID"] cs

instance Xmlable LONG_Description where
	toContent x = [makeToContent ["urn2:languageCode", "urn2:value"] [toContent.ldlanguageCode, toContent.ldvalue] x]
	fromContent cs = LONG_Description (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn2:languageCode", "urn2:value"] cs

instance Xmlable CC_ID where
	toContent x = [makeToContent ["urn0:PartyID", "urn0:ComponentID", "urn0:ChannelID"] [toContent.ccidPartyID, toContent.ccidComponentID, toContent.ccidChannelID] x]
	fromContent cs = CC_ID (fromContent c1) (fromContent c2) (fromContent c3)
		where [c1, c2, c3] = forFromContent nss ["urn0:PartyID", "urn0:ComponentID", "urn0:ChannelID"] cs

instance Xmlable DO_ID where
	toContent x = [makeToContent ["urn0:Name", "urn0:Namespace", "urn0:SoftwareComponentVersionID"] [toContent.doidName, toContent.doidNamespace, toContent.doidSC_VersionID] x]
	fromContent cs = DO_ID (fromContent c1) (fromContent c2) (fromContent c3)
		where [c1, c2, c3] = forFromContent nss ["urn0:Name", "urn0:Namespace", "urn0:SoftwareComponentVersionID"] cs

instance Xmlable GenericProperty where
	toContent x = [makeToContent ["urn0:Name", "urn0:Value"] [toContent.gpName, toContent.gpValue] x]
	fromContent cs = GenericProperty (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:Name", "urn0:Value"] cs

instance Xmlable GP_Table where
	toContent x = [makeToContent ["urn0:Name", "urn0:ValueTableRow"] [toContent.gptName, toContent.gptVT_Row] x]
	fromContent cs = GP_Table (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:Name", "urn0:ValueTableRow"] cs

instance Xmlable GT_Row where
	toContent x = [makeToContent ["urn0:ValueTableCell"] [toContent.gtrVT_Cell] x]
	fromContent cs = GT_Row (fromContent c1)
		where [c1] = forFromContent nss ["urn0:ValueTableCell"] cs

instance Xmlable GT_RowTableCell where
	toContent x = [makeToContent ["urn0:ColumnName", "urn0:Value"] [toContent.gtrtcColumnName, toContent.gtrtcValue] x]
	fromContent cs = GT_RowTableCell (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ColumnName", "urn0:Value"] cs

instance Xmlable ModuleProcess where
	toContent x = [makeToContent ["urn0:ProcessStep", "urn0:ParameterGroup"] [toContent.mpProcessStep, toContent.mpParameterGroup] x]
	fromContent cs = ModuleProcess (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ProcessStep", "urn0:ParameterGroup"] cs

instance Xmlable ProcessStep where
	toContent x = [makeToContent ["urn0:ModuleName", "urn0:ModuleType", "urn0:ParameterGroupID"] [toContent.psModuleName, toContent.psModuleType, toContent.psPG_ID] x]
	fromContent cs = ProcessStep (fromContent c1) (fromContent c2) (fromContent c3)
		where [c1, c2, c3] = forFromContent nss ["urn0:ModuleName", "urn0:ModuleType", "urn0:ParameterGroupID"] cs

instance Xmlable ParameterGroup where
	toContent x = [makeToContent ["urn0:ParameterGroupID", "urn0:Parameter"] [toContent.pgPG_ID, toContent.pgParameter] x]
	fromContent cs = ParameterGroup (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ParameterGroupID", "urn0:Parameter"] cs

instance Xmlable GP_Restricted where
	toContent x = [makeToContent ["urn0:Name", "urn0:Value"] [toContent.gprName, toContent.gprValue] x]
	fromContent cs = GP_Restricted (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:Name", "urn0:Value"] cs

instance Xmlable CA_Identifier where
	toContent x = [makeToContent ["urn0:schemeID", "urn0:schemeAgencyID"] [toContent.caisI_D, toContent.caisA_ID] x]
	fromContent cs = CA_Identifier (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:schemeID", "urn0:schemeAgencyID"] cs

instance Xmlable ChangeOutput where
	toContent x = [makeToContent ["urn1:Response"] [toContent.responseChangeOutput] x]
	fromContent cs = ChangeOutput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:Response"] cs

instance Xmlable CO_ModifyOut where
	toContent x = [makeToContent ["urn0:ChangeListID", "urn0:LogMessageCollection"] [toContent.comoCL_ID, toContent.comoLM_Collection] x]
	fromContent cs = CO_ModifyOut (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ChangeListID", "urn0:LogMessageCollection"] cs

instance Xmlable CL_ID where
	toContent x = [makeToContent ["urn2:ChangeListID", "urn2:Name", "urn2:Description"] [toContent.clidCL_ID, toContent.clidName, toContent.clidDescription] x]
	fromContent cs = CL_ID (fromContent c1) (fromContent c2) (fromContent c3)
		where [c1, c2, c3] = forFromContent nss ["urn2:ChangeListID", "urn2:Name", "urn2:Description"] cs

instance Xmlable LM_Collection where
	toContent x = [makeToContent ["urn0:LogMessage", "urn0:LogMessageChangeList", "urn0:LogMessageParty", "urn0:LogMessageBusinessSystem", "urn0:LogMessageBusinessComponent", "urn0:LogMessageIntegrationProcess", "urn0:LogMessageCommunicationChannel", "urn0:LogMessageSenderAgreement", "urn0:LogMessageReceiverAgreement", "urn0:LogMessageInterfaceDetermination", "urn0:LogMessageReceiverDetermination", "urn0:LogMessageValueMapping", "urn0:LogMessageConfigurationScenario"] [toContent.lmcLogMessage, toContent.lmcLM_ChangeList, toContent.lmcLM_Party, toContent.lmcLM_BusinessSystem, toContent.lmcLM_BusinessComponent, toContent.lmcLM_IntegrationProcess, toContent.lmcLM_CommunicationChannel, toContent.lmcLM_SenderAgreement, toContent.lmcLM_ReceiverAgreement, toContent.lmcLM_InterfaceDetermination, toContent.lmcLM_ReceiverDetermination, toContent.lmcLM_ValueMapping, toContent.lmcLM_ConfigurationScenario] x]
	fromContent cs = LM_Collection (fromContent c1) (fromContent c2) (fromContent c3) (fromContent c4) (fromContent c5) (fromContent c6) (fromContent c7) (fromContent c8) (fromContent c9) (fromContent c10) (fromContent c11) (fromContent c12) (fromContent c13)
		where [c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13] = forFromContent nss ["urn0:LogMessage", "urn0:LogMessageChangeList", "urn0:LogMessageParty", "urn0:LogMessageBusinessSystem", "urn0:LogMessageBusinessComponent", "urn0:LogMessageIntegrationProcess", "urn0:LogMessageCommunicationChannel", "urn0:LogMessageSenderAgreement", "urn0:LogMessageReceiverAgreement", "urn0:LogMessageInterfaceDetermination", "urn0:LogMessageReceiverDetermination", "urn0:LogMessageValueMapping", "urn0:LogMessageConfigurationScenario"] cs

instance Xmlable LogMessage where
	toContent x = [makeToContent ["urn0:LogMessageItem"] [toContent.lmLM_Item] x]
	fromContent cs = LogMessage (fromContent c1)
		where [c1] = forFromContent nss ["urn0:LogMessageItem"] cs

instance Xmlable LM_Item where
	toContent x = [makeToContent ["urn0:SeverityCode", "urn0:ClassificationCode", "urn0:Message"] [toContent.lmiSeverityCode, toContent.lmiClassificationCode, toContent.lmiMessage] x]
	fromContent cs = LM_Item (fromContent c1) (fromContent c2) (fromContent c3)
		where [c1, c2, c3] = forFromContent nss ["urn0:SeverityCode", "urn0:ClassificationCode", "urn0:Message"] cs

instance Xmlable Text where
	toContent x = [makeToContent ["urn0:languageCode", "urn0:value"] [toContent.tlanguageCode, toContent.tvalue] x]
	fromContent cs = Text (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:languageCode", "urn0:value"] cs

instance Xmlable LM_ChangeList where
	toContent x = [makeToContent ["urn0:ChangeListID", "urn0:LogMessageItem"] [toContent.lmclCL_ID, toContent.lmclLM_Item] x]
	fromContent cs = LM_ChangeList (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ChangeListID", "urn0:LogMessageItem"] cs

instance Xmlable LM_Party where
	toContent x = [makeToContent ["urn0:PartyID", "urn0:LogMessageItem"] [toContent.lmpPartyID, toContent.lmpLM_Item] x]
	fromContent cs = LM_Party (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:PartyID", "urn0:LogMessageItem"] cs

instance Xmlable LM_CommunicationComponent where
	toContent x = [makeToContent ["urn0:CommunicationComponentID", "urn0:LogMessageItem"] [toContent.lmccmpCC_ID, toContent.lmccmpLM_Item] x]
	fromContent cs = LM_CommunicationComponent (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:CommunicationComponentID", "urn0:LogMessageItem"] cs

instance Xmlable CCmp_ID where
	toContent x = [makeToContent ["urn0:PartyID", "urn0:ComponentID"] [toContent.ccmpidPartyID, toContent.ccmpidComponentID] x]
	fromContent cs = CCmp_ID (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:PartyID", "urn0:ComponentID"] cs

instance Xmlable LM_CommunicationChannel where
	toContent x = [makeToContent ["urn0:CommunicationChannelID", "urn0:LogMessageItem"] [toContent.lmccCC_ID, toContent.lmccLM_Item] x]
	fromContent cs = LM_CommunicationChannel (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:CommunicationChannelID", "urn0:LogMessageItem"] cs

instance Xmlable LM_MessageHeader where
	toContent x = [makeToContent ["urn0:MessageHeader", "urn0:LogMessageItem"] [toContent.lmmhMessageHeader, toContent.lmmhLM_Item] x]
	fromContent cs = LM_MessageHeader (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:MessageHeader", "urn0:LogMessageItem"] cs

instance Xmlable MH_ID where
	toContent x = [makeToContent ["urn0:SenderPartyID", "urn0:SenderComponentID", "urn0:InterfaceName", "urn0:InterfaceNamespace", "urn0:ReceiverPartyID", "urn0:ReceiverComponentID"] [toContent.mhidSP_ID, toContent.mhidSC_ID, toContent.mhidInterfaceName, toContent.mhidInterfaceNamespace, toContent.mhidRP_ID, toContent.mhidRC_ID] x]
	fromContent cs = MH_ID (fromContent c1) (fromContent c2) (fromContent c3) (fromContent c4) (fromContent c5) (fromContent c6)
		where [c1, c2, c3, c4, c5, c6] = forFromContent nss ["urn0:SenderPartyID", "urn0:SenderComponentID", "urn0:InterfaceName", "urn0:InterfaceNamespace", "urn0:ReceiverPartyID", "urn0:ReceiverComponentID"] cs

instance Xmlable LM_ValueMapping where
	toContent x = [makeToContent ["urn0:ValueMappingID", "urn0:LogMessageItem"] [toContent.lmvmVM_ID, toContent.lmvmLM_Item] x]
	fromContent cs = LM_ValueMapping (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ValueMappingID", "urn0:LogMessageItem"] cs

instance Xmlable LM_ConfigurationScenario where
	toContent x = [makeToContent ["urn0:ConfigurationScenarioID", "urn0:LogMessageItem"] [toContent.lmcsCS_ID, toContent.lmcsLM_Item] x]
	fromContent cs = LM_ConfigurationScenario (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ConfigurationScenarioID", "urn0:LogMessageItem"] cs

instance Xmlable CheckInput where
	toContent x = [makeToContent ["urn1:CommunicationChannelCheckRequest"] [toContent.cC_CheckRequest] x]
	fromContent cs = CheckInput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:CommunicationChannelCheckRequest"] cs

instance Xmlable CC_IdentifierCollection where
	toContent x = [makeToContent ["urn0:CommunicationChannelID"] [toContent.ccicCC_ID] x]
	fromContent cs = CC_IdentifierCollection (fromContent c1)
		where [c1] = forFromContent nss ["urn0:CommunicationChannelID"] cs

instance Xmlable CheckOutput where
	toContent x = [makeToContent ["urn1:Response"] [toContent.responseCheckOutput] x]
	fromContent cs = CheckOutput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:Response"] cs

instance Xmlable CreateInput where
	toContent x = [makeToContent ["urn1:CommunicationChannelCreateRequest"] [toContent.cC_CreateRequest] x]
	fromContent cs = CreateInput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:CommunicationChannelCreateRequest"] cs

instance Xmlable CreateOutput where
	toContent x = [makeToContent ["urn1:Response"] [toContent.responseCreateOutput] x]
	fromContent cs = CreateOutput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:Response"] cs

instance Xmlable CreateFromTemplateInput where
	toContent x = [makeToContent ["urn1:CommunicationChannelCreateFromTemplateRequest"] [toContent.cC_CreateFromTemplateRequest] x]
	fromContent cs = CreateFromTemplateInput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:CommunicationChannelCreateFromTemplateRequest"] cs

instance Xmlable CC_CreateFromTemplateIn where
	toContent x = [makeToContent ["urn0:ChangeListID", "urn0:CommunicationChannel"] [toContent.cccftiCL_ID, toContent.cccftiCommunicationChannel] x]
	fromContent cs = CC_CreateFromTemplateIn (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ChangeListID", "urn0:CommunicationChannel"] cs

instance Xmlable CC_TemplateBased where
	toContent x = [makeToContent ["urn0:MasterLanguage", "urn0:AdministrativeData", "urn0:Description", "urn0:CommunicationChannelID", "urn0:ChannelTemplate", "urn0:AdapterEngineName", "urn0:AdapterSpecificAttribute", "urn0:AdapterSpecificTableAttribute", "urn0:ModuleProcess", "urn0:SenderIdentifier", "urn0:ReceiverIdentifier"] [toContent.cctbMasterLanguage, toContent.cctbAdministrativeData, toContent.cctbDescription, toContent.cctbCC_ID, toContent.cctbChannelTemplate, toContent.cctbAE_Name, toContent.cctbAS_Attribute, toContent.cctbAS_TableAttribute, toContent.cctbModuleProcess, toContent.cctbSenderIdentifier, toContent.cctbReceiverIdentifier] x]
	fromContent cs = CC_TemplateBased (fromContent c1) (fromContent c2) (fromContent c3) (fromContent c4) (fromContent c5) (fromContent c6) (fromContent c7) (fromContent c8) (fromContent c9) (fromContent c10) (fromContent c11)
		where [c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11] = forFromContent nss ["urn0:MasterLanguage", "urn0:AdministrativeData", "urn0:Description", "urn0:CommunicationChannelID", "urn0:ChannelTemplate", "urn0:AdapterEngineName", "urn0:AdapterSpecificAttribute", "urn0:AdapterSpecificTableAttribute", "urn0:ModuleProcess", "urn0:SenderIdentifier", "urn0:ReceiverIdentifier"] cs

instance Xmlable CreateFromTemplateOutput where
	toContent x = [makeToContent ["urn1:Response"] [toContent.responseCreateFromTemplateOutput] x]
	fromContent cs = CreateFromTemplateOutput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:Response"] cs

instance Xmlable DeleteInput where
	toContent x = [makeToContent ["urn1:CommunicationChannelDeleteRequest"] [toContent.cC_DeleteRequest] x]
	fromContent cs = DeleteInput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:CommunicationChannelDeleteRequest"] cs

instance Xmlable CC_DeleteOpenForEditIn where
	toContent x = [makeToContent ["urn0:ChangeListID", "urn0:CommunicationChannelID"] [toContent.ccdofeiCL_ID, toContent.ccdofeiCC_ID] x]
	fromContent cs = CC_DeleteOpenForEditIn (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ChangeListID", "urn0:CommunicationChannelID"] cs

instance Xmlable DeleteOutput where
	toContent x = [makeToContent ["urn1:Response"] [toContent.responseDeleteOutput] x]
	fromContent cs = DeleteOutput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:Response"] cs

instance Xmlable OpenForEditInput where
	toContent x = [makeToContent ["urn1:CommunicationChannelOpenForEditRequest"] [toContent.cC_OpenForEditRequest] x]
	fromContent cs = OpenForEditInput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:CommunicationChannelOpenForEditRequest"] cs

instance Xmlable OpenForEditOutput where
	toContent x = [makeToContent ["urn1:Response"] [toContent.responseOpenForEditOutput] x]
	fromContent cs = OpenForEditOutput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:Response"] cs

instance Xmlable CC_OpenForEditOut where
	toContent x = [makeToContent ["urn0:ChangeListID", "urn0:CommunicationChannel", "urn0:LogMessageCollection"] [toContent.ccofeoCL_ID, toContent.ccofeoCommunicationChannel, toContent.ccofeoLM_Collection] x]
	fromContent cs = CC_OpenForEditOut (fromContent c1) (fromContent c2) (fromContent c3)
		where [c1, c2, c3] = forFromContent nss ["urn0:ChangeListID", "urn0:CommunicationChannel", "urn0:LogMessageCollection"] cs

instance Xmlable CommunicationChannel where
	toContent x = [makeToContent ["urn0:MasterLanguage", "urn0:AdministrativeData", "urn0:Description", "urn0:CommunicationChannelID", "urn0:AdapterMetadata", "urn0:Direction", "urn0:TransportProtocol", "urn0:TransportProtocolVersion", "urn0:MessageProtocol", "urn0:MessageProtocolVersion", "urn0:AdapterEngineName", "urn0:AdapterSpecificAttribute", "urn0:AdapterSpecificTableAttribute", "urn0:ModuleProcess", "urn0:SenderIdentifier", "urn0:ReceiverIdentifier"] [toContent.ccMasterLanguage, toContent.ccAdministrativeData, toContent.ccDescription, toContent.ccCC_ID, toContent.ccAdapterMetadata, toContent.ccDirection, toContent.ccTransportProtocol, toContent.ccTP_Version, toContent.ccMessageProtocol, toContent.ccMP_Version, toContent.ccAE_Name, toContent.ccAS_Attribute, toContent.ccAS_TableAttribute, toContent.ccModuleProcess, toContent.ccSenderIdentifier, toContent.ccReceiverIdentifier] x]
	fromContent cs = CommunicationChannel (fromContent c1) (fromContent c2) (fromContent c3) (fromContent c4) (fromContent c5) (fromContent c6) (fromContent c7) (fromContent c8) (fromContent c9) (fromContent c10) (fromContent c11) (fromContent c12) (fromContent c13) (fromContent c14) (fromContent c15) (fromContent c16)
		where [c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16] = forFromContent nss ["urn0:MasterLanguage", "urn0:AdministrativeData", "urn0:Description", "urn0:CommunicationChannelID", "urn0:AdapterMetadata", "urn0:Direction", "urn0:TransportProtocol", "urn0:TransportProtocolVersion", "urn0:MessageProtocol", "urn0:MessageProtocolVersion", "urn0:AdapterEngineName", "urn0:AdapterSpecificAttribute", "urn0:AdapterSpecificTableAttribute", "urn0:ModuleProcess", "urn0:SenderIdentifier", "urn0:ReceiverIdentifier"] cs

instance Xmlable OA_Data where
	toContent x = [makeToContent ["urn2:ResponsibleUserAccountID", "urn2:LastChangeDateTime", "urn2:LastChangeUserAccountID"] [toContent.oadRU_AccountID, toContent.oadLC_DateTime, toContent.oadLC_UserAccountID] x]
	fromContent cs = OA_Data (fromContent c1) (fromContent c2) (fromContent c3)
		where [c1, c2, c3] = forFromContent nss ["urn2:ResponsibleUserAccountID", "urn2:LastChangeDateTime", "urn2:LastChangeUserAccountID"] cs

instance Xmlable QueryInput where
	toContent x = [makeToContent ["urn1:CommunicationChannelQueryRequest"] [toContent.cC_QueryRequest] x]
	fromContent cs = QueryInput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:CommunicationChannelQueryRequest"] cs

instance Xmlable CC_QueryIn where
	toContent x = [makeToContent ["urn0:CommunicationChannelID", "urn0:Description", "urn0:AdministrativeData"] [toContent.ccqiCC_ID, toContent.ccqiDescription, toContent.ccqiAdministrativeData] x]
	fromContent cs = CC_QueryIn (fromContent c1) (fromContent c2) (fromContent c3)
		where [c1, c2, c3] = forFromContent nss ["urn0:CommunicationChannelID", "urn0:Description", "urn0:AdministrativeData"] cs

instance Xmlable QueryOutput where
	toContent x = [makeToContent ["urn1:Response"] [toContent.responseQueryOutput] x]
	fromContent cs = QueryOutput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:Response"] cs

instance Xmlable CC_QueryOut where
	toContent x = [makeToContent ["urn0:CommunicationChannelID", "urn0:LogMessageCollection"] [toContent.ccqoCC_ID, toContent.ccqoLM_Collection] x]
	fromContent cs = CC_QueryOut (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:CommunicationChannelID", "urn0:LogMessageCollection"] cs

instance Xmlable ReadInput where
	toContent x = [makeToContent ["urn1:CommunicationChannelReadRequest"] [toContent.cC_ReadRequest] x]
	fromContent cs = ReadInput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:CommunicationChannelReadRequest"] cs

instance Xmlable CC_ReadIn where
	toContent x = [makeToContent ["urn0:ReadContext", "urn0:CommunicationChannelID"] [toContent.ccriReadContext, toContent.ccriCC_ID] x]
	fromContent cs = CC_ReadIn (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:ReadContext", "urn0:CommunicationChannelID"] cs

instance Xmlable ReadOutput where
	toContent x = [makeToContent ["urn1:Response"] [toContent.responseReadOutput] x]
	fromContent cs = ReadOutput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:Response"] cs

instance Xmlable CC_ReadOut where
	toContent x = [makeToContent ["urn0:CommunicationChannel", "urn0:LogMessageCollection"] [toContent.ccroCommunicationChannel, toContent.ccroLM_Collection] x]
	fromContent cs = CC_ReadOut (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["urn0:CommunicationChannel", "urn0:LogMessageCollection"] cs

instance Xmlable RevertInput where
	toContent x = [makeToContent ["urn1:CommunicationChannelRevertRequest"] [toContent.cC_RevertRequest] x]
	fromContent cs = RevertInput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:CommunicationChannelRevertRequest"] cs

instance Xmlable RevertOutput where
	toContent x = [makeToContent ["urn1:Response"] [toContent.responseRevertOutput] x]
	fromContent cs = RevertOutput (fromContent c1)
		where [c1] = forFromContent nss ["urn1:Response"] cs

